import "@/base.less"
import { Modal } from 'bootstrap'
import '@/other/test'

// 引入图片
import testPng from '@/assets/test.png'
// 视图通过 innerHTML （可以import pug 文件） 设置
document.body.innerHTML = `
<h2>这是注册sdfsdf</h2>
<img src="${testPng}"/>
<div class="modal fade" id="testModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title">Modal title</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <div class="modal-body">
        <p>Modal body text goes here.</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
        <button type="button" class="btn btn-primary">Save changes</button>
      </div>
    </div>
  </div>
</div>
<button class="btn btn-primary" id="test">使用 bootstrap 按钮</button>
`

const modal = new Modal(document.querySelector('#testModal'))
console.log(modal)
document.querySelector('#test').onclick = () => {
  modal.show()
}